The AnalyzehDib method is used to recognize the barcodes in the image.
Method | Description |
GetBarcode | Returns access to the result properties with data of the given barcode index. |
GetBarcodeResultDataValue | Gets the BarcodeResult as an array of bytes. |
GetModeTransition | Returns the mode transitions for the barcode. |
Property | Description |
NumBarcodes | Gets the number of barcodes recognized. |
BarcodeResult | Gets the string value of the recognized barcode. |
ResultLen | Gets the result length of the recognized barcode. |
Confidence | Gets the confidence of the barcode that was recognized. |
BarcodeCodeName | Gets the name of the recognized barcode. |
BarcodeResultStyle | Gets the numeration type of the recognized barcode. |
BarcodeX | Gets the left edge of the image area of the recognized barcode. |
BarcodeY | Gets the top of the image area of the recognized barcode. |
BarcodeH | Gets the height of the image area of the recognized barcode. |
BarcodeW | Gets the width of the image area of the recognized barcode. |
BarcodeSkew | Gets the angle of the recognized barcode. |
ChecksumCharCount | Gets the number of characters in the recognized checksum. |
ChecksumOK | Gets a check if there is a valid checksum value for the recognized barcode. |
NumModeTransitions | Gets the number of mode transitions for the barcodes recognized. |
ModeTransitionIndex | Gets the index location of the mode transition. |
ModeTransitionType | Gets the type of the mode transition. |
Result2DRowsDetected | Gets the number of rows detected for the recognized 2D barcode. |
Result2DColumnsDetected | Gets the number of columns detected for the recognized 2D barcode. |
Result2DRows | Gets the number of rows defined by the indicator pattern for the recognized 2D barcode. |
Result2DColumns | Gets the number of columns defined by the indicator pattern for the recognized 2D barcode. |
Result2DErrorCorrectionLevel | Gets the error correction level detected for the recognized 2D barcode. |
Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.
VB6 - Example code to get multiple barcode results (in an array) |
Copy Code
|
---|---|
'Sort the results top to bottom Dim BarcodeArray() As BarcodeInfo Redim BarcodeArray(0 To BarcodeXpress1.NumBarcodes - 1) ' fill the user type array For i = 0 To BarcodeXpress1.NumBarcodes - 1 BarcodeXpress1.GetBarcode i BarcodeArray(i).CodeName = BarcodeXpress1.BarcodeCodeName BarcodeArray(i).result = BarcodeXpress1.BarcodeResult BarcodeArray(i).CheckSumOK = BarcodeXpress1.CheckSumOK BarcodeArray(i).Confidence = BarcodeXpress1.Confidence BarcodeArray(i).Length = BarcodeXpress1.ResultLen BarcodeArray(i).X = BarcodeXpress1.BarcodeX BarcodeArray(i).Y = BarcodeXpress1.BarcodeY BarcodeArray(i).H = BarcodeXpress1.BarcodeH BarcodeArray(i).W = BarcodeXpress1.BarcodeW Next i ' actual sort results top to bottom Dim temp As BarcodeInfo For i = Ubound(BarcodeArray) - 1 To 0 Step -1 For j = 0 To i If BarcodeArray(j).Y > BarcodeArray(j + 1).Y Then temp = BarcodeArray(j + 1) BarcodeArray(j + 1) = BarcodeArray(j) BarcodeArray(j) = temp End If Next Next |
1D barcode values are generally 7 bit ASCII, except for Code 128, which permits the use of 8 bit data. If you are using values above 127, you must use the GetBarcodeResultDataValue method instead of the BarcodeResult property, and your data must be encoded. Also, the reader and writer must both use the same character set.
See the Overview topic for code examples on recognition results.